package net.qhzw.vip.qiyu.handler;

import cn.afterturn.easypoi.handler.impl.ExcelDataHandlerDefaultImpl;
import net.qhzw.vip.qiyu.model.ItineraryCollExcel;
import org.apache.poi.common.usermodel.HyperlinkType;
import org.apache.poi.ss.usermodel.CreationHelper;
import org.apache.poi.ss.usermodel.Hyperlink;

public class ExcelDataHandler extends ExcelDataHandlerDefaultImpl<ItineraryCollExcel> {

    @Override
    public Hyperlink getHyperlink(CreationHelper creationHelper, ItineraryCollExcel obj, String name, Object value) {
        Hyperlink hyperlink = creationHelper.createHyperlink(HyperlinkType.FILE);
        hyperlink.setLabel(name);
        hyperlink.setAddress((String) value);

        return hyperlink;
    }


}
